<!DOCTYPE html>
<html lang="cn" ng-app="APP">
<head>
    <meta charset="UTF-8">
    <meta name="fragment" content="!">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <title ng-bind="SEO$.title"></title>
    <meta name="keywords" content="{{SEO$.keywords}}">
    <meta name="description" content="{{SEO$.description}}">
    <!-- build:Bootstrap-css -->
    <link rel="stylesheet" href="../../node_modules/bootstrap-css-only/css/bootstrap.css"/>
    <!-- endbuild -->
</head>
<body style="padding-top: 60px;overflow-x: hidden">

<!--顶部导航条-->
<nav class="navbar navbar-default navbar-fixed-top" ng-controller="bs_navBarCtrl">
    <div class="container">

        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class="navbar-brand" style="padding: 9px" ui-sref="book.recommend()">
                <img class="img-responsive img-rounded" style="width: 32px" alt="书循" src="../img/logo-R.png">
            </a>
            <button type="button" class="navbar-toggle" btn-checkbox ng-model="navbarCollapseIsClosed">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" collapse="navbarCollapseIsClosed">

            <!-- 常用链接-->
            <ul class="nav navbar-nav">
                <li><a ui-sref="book.book-list({cmd:'latest'})">新书速递</a></li>
                <li><a ui-sref="book.used-book-list({cmd:'nearCircle'})">图书漂流</a></li>
                <li><a ui-sref="book.used-book-list({cmd:'nearUsed'})">旧书转让</a></li>
                <li><a ui-sref="book.used-book-list({cmd:'nearNeed'})">求书公告</a></li>
                <li><a ui-sref="common.user-list({cmd:'near'})">附近同学</a></li>
            </ul>

            <!-- 游客链接-->
            <a ui-sref="common.hello" class="btn btn-info navbar-btn" ng-if="!me">登入</a>

            <!-- 搜索表单-->
            <form class="navbar-form navbar-right">
                <div class="form-group">
                    <div class="input-group">
                        <span class="input-group-btn" ng-if="SearchBook$.books.length>0">
                            <button class="btn btn-danger" ng-click="endSearch()">结束搜索</button>
                        </span>
                        <input autofocus type="search" class="form-control" placeholder="搜索 书名、作者、ISBN"
                               ng-model="SearchBook$.keyword"
                               ng-change="SearchBook$.searchInputOnChange()">
                        <span class="input-group-addon" ng-if="SearchBook$.isLoading">加载中...</span>
                    </div>
                </div>
            </form>

            <!-- 用户链接-->
            <ul class="nav navbar-nav navbar-right" ng-if="me">

                <li><a ui-sref="common.user-home({ownerId:me.id})">我的书架</a></li>

                <li dropdown>
                    <a href="#" dropdown-toggle>消息 <span class="badge" ng-bind="Status$.unreadCountSum()"></span></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a ui-sref="person.status-list({cmd:'private'})">同学给我发的私信
                                <span class="badge"
                                      ng-if="Status$.PrivateStatus.unreadCount>0"
                                      ng-bind="Status$.PrivateStatus.unreadCount"></span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="person.status-list({cmd:'reviewUsedBook'})">同学对我的书的评价
                                <span class="badge"
                                      ng-if="Status$.ReviewUsedBookStatus.unreadCount>0"
                                      ng-bind="Status$.ReviewUsedBookStatus.unreadCount"></span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="person.status-list({cmd:'newUsedBook'})">我关注的同学新上传的旧书
                                <span class="badge"
                                      ng-if="Status$.NewUsedBookStatus.unreadCount>0"
                                      ng-bind="Status$.NewUsedBookStatus.unreadCount"></span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="person.status-list({cmd:'newNeedBook'})">我关注的同学新发布的求书
                                <span class="badge"
                                      ng-if="Status$.NewNeedBookStatus.unreadCount>0"
                                      ng-bind="Status$.NewNeedBookStatus.unreadCount"></span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="person.status-list({cmd:'newCircleBook'})">我关注的同学新发布的书漂流
                                <span class="badge"
                                      ng-if="Status$.NewCircleBookStatus.unreadCount>0"
                                      ng-bind="Status$.NewCircleBookStatus.unreadCount"></span>
                            </a>
                        </li>
                    </ul>
                </li>

                <li dropdown>
                    <!-- avatar-->
                    <a style="padding: 9px;cursor: pointer" dropdown-toggle>
                        <img class="img-responsive img-circle" style="width: 32px"
                             ng-src="{{me.avatarUrlWithSize(64)}}">
                    </a>
                    <ul class="dropdown-menu">
                        <li ng-if="followeeNumber>0">
                            <a ui-sref="common.user-list({cmd:'followee'})">关注<strong ng-bind="followeeNumber"></strong>位同学</a>
                        </li>
                        <li ng-if="followerNumber>0">
                            <a ui-sref="common.user-list({cmd:'follower'})">有<strong ng-bind="followerNumber"></strong>位粉丝</a>
                        </li>
                        <li>
                            <a ui-sref="person.upload-one-used-book({role:'sell'})">上传旧书</a>
                        </li>
                        <li>
                            <a ui-sref="person.upload-one-used-book({role:'need'})">发布求书</a>
                        </li>
                        <li>
                            <a ui-sref="person.upload-one-used-book({role:'circle'})">上传书漂流</a>
                        </li>
                        <li ng-click="logOut()">
                            <a href="#">退出</a>
                        </li>
                    </ul>
                </li>
            </ul>

        </div>
    </div>
</nav>

<div class="container">
    <!-- 搜索结果-->
    <div class="row" ng-controller="bs_navBarCtrl" ng-hide="SearchBook$.books.length==0">
        <div class="col-md-12">
            <h4 class="text-center"><strong ng-bind="SearchBook$.keyword"></strong> 搜索结果</h4>
            <hr>
        </div>
        <div class="col-sm-1 col-md-3" ng-repeat="bookInfo in SearchBook$.books">
            <bs-one-book-info book-info="bookInfo"
                              should-show-used-books-count="true"
                              popover-placement="right"
                              ng-click="endSearch()"></bs-one-book-info>
        </div>
        <div class="col-xs-12 text-center">
            <button style="margin: 5px" class="btn btn-info btn-lg" ng-if="SearchBook$.hasMore()"
                    ng-click="SearchBook$.loadMore()">加载更多
            </button>
            <hr>
        </div>
    </div>

    <!-- 主要内容区-->
    <div class="row">
        <main class="col-md-12" ui-view></main>
    </div>

</div>

<footer class="text-center">&copy武汉市书循科技有限公司</footer>
<!-- build:Avos-js -->
<script src="../../node_modules/avoscloud-sdk/dist/av-core.js"></script>
<!-- endbuild -->
<!-- build:LeanAnalytics-js -->
<script src="../../node_modules/leancloud-analytics/src/AV.analytics.js"></script>
<!-- endbuild -->
<!-- build:Angular-js -->
<script src="../../node_modules/angular/angular.js"></script>
<!-- endbuild -->
<!-- build:AngularUIRouter-js -->
<script src="../../node_modules/angular-ui-router/release/angular-ui-router.js"></script>
<!-- endbuild -->
<!-- build:UIBootstrap-js -->
<script src="../../node_modules/angular-bootstrap/ui-bootstrap.js"></script>
<!-- endbuild -->
<!-- build:UIBootstrapTpls-js -->
<script src="../../node_modules/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<!-- endbuild -->
<!-- build:Index-js -->
<script src="../js/util.js"></script>
<script src="../js/model.js"></script>
<script src="../js/analytics.js"></script>
<script src="js/app.js"></script>
<!--Service-->
<script src="../js/service/book-recommend.js"></script>
<script src="../js/service/douban-book.js"></script>
<script src="../js/service/info-service.js"></script>
<script src="../js/service/book-info.js"></script>
<script src="../js/service/search-book.js"></script>
<script src="../js/service/status.js"></script>
<script src="../js/service/used-book.js"></script>
<script src="../js/service/user.js"></script>
<script src="js/service/seo.js"></script>
<script src="js/service/bootstrap-modal-view.js"></script>
<script src="js/service/wechat-news.js"></script>
<!--Controller-->
<script src="js/controller/common/bs-nav-bar-ctrl.js"></script>

<script src="../js/controller/book/book-recommend-ctrl.js"></script>
<script src="js/controller/book/bs-book-recommend-ctrl.js"></script>

<script src="../js/controller/book/book-list-ctrl.js"></script>
<script src="js/controller/book/bs-book-list-ctrl.js"></script>

<script src="../js/controller/book/used-book-list-ctrl.js"></script>
<script src="js/controller/book/bs-used-book-list-ctrl.js"></script>

<script src="../js/controller/book/one-book-ctrl.js"></script>
<script src="js/controller/book/bs-one-book-ctrl.js"></script>

<script src="../js/controller/book/one-used-book-ctrl.js"></script>
<script src="js/controller/book/bs-one-used-book-ctrl.js"></script>

<script src="../js/controller/common/user-home-ctrl.js"></script>
<script src="js/controller/common/bs-user-home-ctrl.js"></script>

<script src="../js/controller/person/send-msg-to-user-ctrl.js"></script>
<script src="js/controller/person/bs-send-msg-to-user-ctrl.js"></script>

<script src="../js/controller/person/upload-one-used-book-ctrl.js"></script>

<script src="../js/controller/person/edit-one-used-book-ctrl.js"></script>

<script src="../js/controller/common/user-list-ctrl.js"></script>
<script src="js/controller/common/bs-user-list-ctrl.js"></script>

<script src="../js/controller/person/status-list-ctrl.js"></script>

<script src="js/controller/common/bs-hello-ctrl.js"></script>

<script src="js/controller/common/bs-signup-ctrl.js"></script>
<script src="js/controller/common/bs-login-ctrl.js"></script>
<!--Directive-->
<script src="js/directive/bs-infinite-scroll.js"></script>
<script src="js/directive/bs-one-book-info.js"></script>
<script src="js/directive/bs-one-used-book.js"></script>
<script src="js/directive/bs-one-user.js"></script>
<script src="js/directive/bs-one-book-info-detail.js"></script>
<script src="js/directive/bs-one-status.js"></script>
<!-- endbuild -->
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
</body>
</html>